<extend name="Base/common" />
<block name="body">
  <script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
  <!-- 标签页导航 -->
  <div class="span9 page_message">
    <section id="contents">
      <include file="Addons/_nav" />
      <div class="tab-content"> 
        <!-- 表单 -->      
            <php> $post_url || $post_url = U('edit?model='.$model['id']);</php>
        <form id="form" action="{:$post_url}" method="post" class="form-horizontal form-center">
          <!-- 基础文档模型 -->
          <div id="tab1" class="tab-pane in              tab1">
                              <div class="form-item cf">
                    <label class="item-label">
                                        关键词                    <span class="check-tips">
                                            </span></label>
                    <div class="controls">
                      <input type="text" class="text input-large" name="keyword" value="{$data.keyword}">                    </div>
                  </div>                <div class="form-item cf">
                    <label class="item-label">
                                        接口网址                    <span class="check-tips">
                                            </span></label>
                    <div class="controls">
                      <input type="text" class="text input-large" name="apisite" value="{$data.apisite}">                    </div>
                  </div>                                <div class="form-item cf">
                    <label class="item-label">
                                        接口标题                    <span class="check-tips">
                                            </span></label>
                    <div class="controls">
                      <input type="text" class="text input-large" name="title" value="{$data.title}">                    </div>
                  </div>      



 <div class="form-item cf">
                    <label class="item-label">
                                        token                  <span class="check-tips">
                                            </span></label>
                    <div class="controls">
                      <input type="text" class="text input-large" name="parameters" value="{$data.parameters}">                    </div>
                  </div>    


                                                <div class="form-item cf">
                    <label class="item-label">
                                        备注                    <span class="check-tips">
                                            </span></label>
                    <div class="controls">
                      <input type="text" class="text input-large" name="remark" value="{$data.remark}">                    </div>
                  </div>              



<div class="form-item cf">
                    <label class="item-label">
                                        是否过滤关键词                    <span class="check-tips">
                                            </span></label>
                    <div class="controls">
                      <select name="isfilter">
                            <option value="0" <eq name="data.isfilter" value="0">selected</eq>  >过滤  </option>
                               <option value="1"    <eq name="data.isfilter" value="1">selected</eq>
                                                            >不过滤                              </option>                          </select>                    </div>
                  </div>               

                    <div class="form-item cf">
                    <label class="item-label">
                                        状态                    <span class="check-tips">
                                            </span></label>
                    <div class="controls">
                      <select name="status">
                            <option value="0"   <eq name="data.status" value="0">selected</eq> >启用   </option>
                             <option value="1"    <eq name="data.status" value="1">selected</eq> >禁用</option>                          </select>                    </div>
                  </div>  


                                                            </div>          <div class="form-item cf">
            <input type="hidden" name="id" value="{$data.id}">            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
          </div>
        </form>
        <!--通用的微信预览模板-->
<!--头部标题栏-->
<!--鉴于样式title放进具体每块模块-->
<!--CSS模块-->
<div class="weixin-preview">
  <p class="preview-tips">微信回复预览</p>
  <div class="weixin-box">
  <p class="weixin-title"></p>
    <div class="weixin-cover"><img class="weixin-cover-pic" src=""/></div>
    <p class="weixin-content">
      
    </p>
</div>
<script type="text/javascript">
$('.tab-content').addClass('has-weixinpreivew');
if($('input[name="title"]').val()!=undefined){
  $('.weixin-title').html($('input[name="title"]').val());
}else{
  $('.weixin-title').html($('input[name="config[title]"]').val());
}
if($('textarea[name="content"]').val()!=undefined){
  $('.weixin-content').html($('textarea[name="content"]').val());
}else if($('textarea[name="intro"]').val()!=undefined){
  $('.weixin-content').html($('textarea[name="config[intro]"]').val());
  }else{
  $('.weixin-content').html($('textarea[name="config[info]"]').val());  
}
var weixin_cover_picurl = $('#cover_id_picurl').next().find('img').attr('src');
if(weixin_cover_picurl==undefined)weixin_cover_picurl=$('#cover_id_cover').next().find('img').attr('src');
if($('#cover_id_cover').val()==undefined && $('#cover_id_picurl').val()==undefined){
  $('.weixin-preview').hide();
  }
if(weixin_cover_picurl==undefined || weixin_cover_picurl==""){
  $('.weixin-cover-pic').attr('src',"/Public/Home/images/no_cover.png");
}else{
  $('.weixin-cover-pic').attr('src',weixin_cover_picurl);
}
$('input[name="title"]').keyup(function(){
  $('.weixin-title').html($(this).val());
  });
$('textarea[name="content"]').keyup(function(){
  $('.weixin-content').html($(this).val());
  });
$('textarea[name="info"]').keyup(function(){
  $('.weixin-content').html($(this).val());
  });
$('textarea[name="intro"]').keyup(function(){
  $('.weixin-content').html($(this).val());
  });
</script>
      </div>
    </section>
  </div>
  </div>

</div>
</div>
  <!-- /主体 -->


<script type="text/javascript">
(function(){
  var ThinkPHP = window.Think = {
    "ROOT"   : "", //当前网站地址
    "APP"    : "/index.php?s=", //当前项目地址
    "PUBLIC" : "/Public", //项目公共目录地址
    "DEEP"   : "/", //PATHINFO分割符
    "MODEL"  : ["3", "", "html"],
    "VAR"    : ["m", "c", "a"]
  }
})();
</script>

<link href="/Public/static/datetimepicker/css/datetimepicker.css?v=1406327622" rel="stylesheet" type="text/css">
<link href="/Public/static/datetimepicker/css/dropdown.css?v=1406327622" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/Public/static/datetimepicker/js/bootstrap-datetimepicker.min.js"></script> 
<script type="text/javascript" src="/Public/static/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script> 
<script type="text/javascript">
$('#submit').click(function(){
    $('#form').submit();
});

$(function(){
  $('.time').datetimepicker({
        format: 'yyyy-mm-dd hh:ii',
        language:"zh-CN",
        minView:2,
        autoclose:true
    });
    showTab();
});
</script>

</block>
